package com.cn.enumeration.gpt;

public class Demo4 {
    public static void main(String[] args) {
        for (Fruit fruit : Fruit.values()) {
            System.out.println(fruit + ": " + fruit.getDescription());
        }
    }
}

interface Describable {
    String getDescription();
}

enum Fruit implements Describable {
    APPLE {
        public String getDescription() {
            return "A sweet red fruit";
        }
    },
    BANANA {
        public String getDescription() {
            return "A long yellow fruit";
        }
    };
}